Guild icon
wafer.space Community
📐 - Designing / 🕰️-analog
Between 2026-08-31 11:59 p.m. and 2026-10-01 12:00 a.m.
Avatar
Has anyone used the mimcap in an analog design before?
Avatar
Avatar
Tholin
Has anyone used the mimcap in an analog design before?
Andrew Wingate 2026-09-01 4:36 p.m.
These guys did, https://github.com/ishi-kai/ISHI-KAI_Multiple_Projects_WaferSapce-GF180-1 But don't know any of their handles, or even if they are here.
ISHI-KAI's Multiple Projects Wafer for Wafer.Sapce GF180 Run 1. - ishi-kai/ISHI-KAI_Multiple_Projects_WaferSapce-GF180-1
Avatar
Also, why is it that whenever I do calma on a layout, it says "X problems occured." and these white things show up? It doesn’t happen if I first flatten the layout.
4:36 p.m.
I don’t know if the resulting GDSII is usable
Avatar
Avatar
Tholin
I don’t know if the resulting GDSII is usable
Andrew Wingate 2026-09-01 4:36 p.m.
That's all I got, sorry
Avatar
Now I can’t even extract without warnings. I wanna know how to view those.
Avatar
feedback save xxx.txt. iirc
Avatar
Oh, magic is doing a weird without generating a warning. The calma command generates this outcropping of nplus that is not present in any way in the mag file, causing DRC errors.
Avatar
The gf180mcu tech file is definitely not perfect. NPLUS and PPLUS have weird rules about overlap when near the limit of nwell but I always managed to tweak the mag to get valid output.
Avatar
And after all the subcircuits, it simply boils down to this
9:52 a.m.
Having an overtemperature shutdown that turns off if it just gets vaguely "too hot" would be nice, but that’s about it.
3:03 p.m.
Might be okay?
Avatar
Yeah not unexpected. If DRC passed it's fine
Avatar
I’ve been doing nothing but layout for three days (edited)
3:30 p.m.
All building up to this. This is the circuit that I showed before, that generates 4 reference voltages and then has an analog multiplexer to choose one with two digital inputs.
3:31 p.m.
Zoom-in on the analog multiplexer
👀 1
💜 1
Avatar
I keep having troubles with the diode models!
Avatar
Its specifically D2 here
Avatar
The other time I’ve had trouble with the diode models was also a resistor and diode in series...
Avatar
What are the diode for ?
Avatar
Update: got it working
10:26 p.m.
This is from simulating the extraced SPICE
💜 1
Avatar
Avatar
madbrain
yeah typically for synthesizers the more common filter types are state variable (SVF) and moog-style 4 pole ladder... often deliberately non-linear so that the response doesn't blow up when you crank up the Q-factor... might have to look into having the output current mirrors have a digitally controllable multiplication factor 🤔
Are you also doing audio? Did that get anywhere?
Avatar
Avatar
Archit3ch
Are you also doing audio? Did that get anywhere?
I've been doing lots of audio but on desktop in C++ finally
💙 1
Avatar
Avatar
madbrain
I've been doing lots of audio but on desktop in C++ finally
Ahhh, I use Julia for desktop SPICE audio 😎
Avatar
interesting choice :3 we have our own backend code rather than juce for doing vst/au/aax/clap plugins
Avatar
Do you work under a brand?
2:15 p.m.
I'm closer to 'custom assembly for the specific application' but Julia still plays a critical role.
Avatar
3 people in our small company
2:15 p.m.
Plogue Art et Technologie, Inc. Makers of chipsounds, Bidule, chipspeech, chipsynth and many others.
Avatar
Wait, I know those guys. 🫡
2:16 p.m.
I mean I've heard of you.
Avatar
lots of retro synths like FM and SNES and C64 emulation
❤️‍🔥 1
Avatar
Avatar
Tholin
I wish I could increase the lengths of the diffusion contacts, but this will do
Why shouldn't you be able to increase the length of them?
Avatar
Avatar
Tholin
I heard longer transistors reduce the effects of process tolerances, so these are 2u long
I don't think you want to go quite that long for your LDO; this has considerable minimum drop out at "full current" and not itself for thermal reasons, or viewed from the other direction: long channels for your main power pass FET beyond what's needed to be safe and reliable under years of sustained current would push the minimum pass resistance so high that you'd likely hit thermal limits for drop out voltage with the pass transistor gate fully-on, instead of needing to operate under gate-not-fully-on "active regulation" conditions to drop enough voltage at full sustained current for that I × V = I² × R = Power to hit TDP. You've got closed loop feedback control going on, the process variations of concern shouldn't matter much here, as long as all those fingers see the same usual voltage drop across them.
Avatar
Avatar
Tholin
10 fingers is the most I can do before I get tap violations and need to insert nwell contacts.
That can be just on the source side abutted though, right?
Avatar
Avatar
namibj
Why shouldn't you be able to increase the length of them?
That’s not an option in the device generator
Avatar
Avatar
Tholin
Well, time to spend the next few hours of my life placing contacts!
Definitely make a script please for your bulk LDO pass pfet PCell! You want it easy to adjust afterwards! @tnt might have convenient macros for contact generation down to PCell power bars from orthogonal higher-layer aggregating metal PDN straps, as that's basically done on TinyTapeout from the PDN to the user content.
Avatar
Its not a PCell though
5:58 p.m.
I mean, I just used the array command in magic
Avatar
Jonah Saunders 2026-09-04 6:12 p.m.
is there a question chat?
Jonah Saunders started a thread. 2026-09-04 6:16 p.m.
Avatar
Avatar
Tholin
Click to see attachment 🖼️
So, if I try and run this simulation with the SPICE-extracted netlist of my power PFET array, it works for a while, until charging is completed. After a few us, current on V2 increases rapidly until it breaks the simulation ("timestep too small"), but the gate voltage remains at 5V and the capacitor doesn’t charge, so I don’t know where that energy is going. Is this a simulation oopsie or latchup?
Avatar
By "rapidly" I mean a straight horizontal line on the graph
Avatar
Avatar
Tholin
660 fingers can probably do way more than 1A (the planned maximum), but spreading that load, and thus the thermal output, out is still good
As long as mismatch modeling statistics say that all your fingers are under similar enough behavior under all the load-spreading-critical "[(supposed) safe (at full packaged IC level)] operating areas" such as to give good enough control (e.g. sense fingers bypassing into current sense resistors) and good enough thermal balancing, you're good. You can do fairly analytical handling of the mismatch modeling equations for the FETs. Sadly for economic numerical modeling we'd need the tricks that use sensitivity calculations to massively boost sample efficiency for the monte carlo sampling, by essentially asking the simulator how meaningless any given random variable that's monte-carlo'd is for the output measure under investigation (e.g. some quantified thermal balancing). Also do keep in mind that if you do conform your pad ring to the limitations/restrictions of the ACF flip chip bonding we're testing with FC01 (which btw. are not incompatible with performing the classic COB wedge bonding that was done to your accidentally-self-melting-DAC chip): you could use dual-sided heat sink attachment through thin polyimide and ACF on top and the thinned silicon substrate on the back, and further exploit the current handling capability of the much larger attachment opportunity if you use some extra/bonus high-current pads formed from top metal over the power FET ("circuit under pad"). https://acffilm.com/acf-film.html#acf-cof E.g. "TCF7040/41 Series" (https://3tfrontiers.com/anisotropic-conductive-film-acf-cof/) seems to be specified for minimum pad area of 1500 μm² and min pad space is 15μm and from what I understand claims <1Ω contact resistance (I'm assuming for a minimum nominal contact; at a 50A/mm² max current density claimed in the datasheet of AC-7206U-18, that'd be <75 mV and <3.75 W/mm² (from contact ohmic heating alone, at such upper-limit levels of current density))... Don't worry our bond pads are not too small for ACF to work with decent reliability (like, IIRC in practice over 2 nines of yield per foundry pad ring sized bond pad if a small pillar/bump/column is formed; the tape is 10~30~50 μm thick and the bumps need to be a large fraction but less than the thickness of the tape), just the classic chip on flex formulations aren't targeting pad sizes that are closer to face-to-face chip-to-chip bonding (e.g. non-silicon photodiode array or even silicon based avalanche photo diode array, directly bonded to a small-process-node readout ASIC in a "normal [Bi]CMOS process") than purpose designed top metal pads for commodity flex-PCB-DesignForManufacturability.
Telephus ACF Product overview - FPC, PCB, LCD, ITO Glass, FR4, COG, COF, COB, FOF, COP
Avatar
Avatar
Tholin
Having an overtemperature shutdown that turns off if it just gets vaguely "too hot" would be nice, but that’s about it.
...... Hmmm...... I have an idea, if you can have one precision (I think 1% should suffice) resistor (e.g. off-chip) to set the over temp threshold, a simplehttps://en.wikipedia.org/wiki/Brokaw_bandgap_reference or if you already have a voltage reference, just a plain diode wired almost-parallel with the off-chip resistor (they share separate precision poly resistor array resistors; threshold is when the voltage across the diode drops below the voltage across the resistor; the poly resistor array gives you two pretty-identical resistors to provide practically-identical biasing conditions)). Let me draw that up real quick if I can get my computer's internet back to "properly working"; or upon request with pen & paper if I'm failing/too slow to fix computer. Principle is that an off-die resistor can easily provide a decent tolerance if compared to a "proportional to absolute temperature" diode/bandgap thermal sense that nicely fits right besides a thermal hotspot on the die.
Avatar
Avatar
Tholin
Its specifically D2 here
Might be xschem rounding error not actually joining them despite it looking joined to the eye. You can use the hotkey for snap-to-connection-point to focus on the two symbol's pins, then drag out to the middle of nowhere to a grid aligned spot, taking care to draw both parts starting from the symbol's pin and ending at the shared location in the middle of nowhere. Use the "highlight connected net" (iirc k) action on both parts to verify they're now connected. If it then works without complaint you know it was the error and can try to snap all associated drawings in the schematic to grid, and clean the "wire excursion to the middle of nowhere" up.
Avatar
It seems to have just kinda fixed itself?
Avatar
Avatar
Tholin
So, if I try and run this simulation with the SPICE-extracted netlist of my power PFET array, it works for a while, until charging is completed. After a few us, current on V2 increases rapidly until it breaks the simulation ("timestep too small"), but the gate voltage remains at 5V and the capacitor doesn’t charge, so I don’t know where that energy is going. Is this a simulation oopsie or latchup?
AFAIK latchup isn't modeled in the extraction/SPICE, at least for the MOSFETs; can you share me the two SPICE situations (normal vs. PEX) so I can look?
Avatar
Avatar
Tholin
It seems to have just kinda fixed itself?
One major thing to consider is what absolute and relative tolerances are set for the solver; the power FET might be a bit out of typical scale and thus could reasonably trip convergence warning thresholds like that from attempting to go for whatever time steps make it's time discretisation originating approximation error small enough to meet the target tolerance.... despite handling currents FAR larger than what the config defaults of the PDK are actually good for.
8:34 p.m.
8:35 p.m.
I think you can tell which is which by the filesize
8:35 p.m.
Delete the include referencing a "power_fet_f" on the first file
Avatar
Avatar
namibj
...... Hmmm...... I have an idea, if you can have one precision (I think 1% should suffice) resistor (e.g. off-chip) to set the over temp threshold, a simplehttps://en.wikipedia.org/wiki/Brokaw_bandgap_reference or if you already have a voltage reference, just a plain diode wired almost-parallel with the off-chip resistor (they share separate precision poly resistor array resistors; threshold is when the voltage across the diode drops below the voltage across the resistor; the poly resistor array gives you two pretty-identical resistors to provide practically-identical biasing conditions)). Let me draw that up real quick if I can get my computer's internet back to "properly working"; or upon request with pen & paper if I'm failing/too slow to fix computer. Principle is that an off-die resistor can easily provide a decent tolerance if compared to a "proportional to absolute temperature" diode/bandgap thermal sense that nicely fits right besides a thermal hotspot on the die.
Avatar
At least I think that's the way described above. Basically that. Or approximately that. Diode has as far as I understand it about -2 mV/K temperature dependence under vaguely constant current conditions. So a +- 5 K tolerance for the trip point would only need +-10 mV performance from the comparator and the reference used by said comparator. I'm not sure but I'd definitely throw the idea of using polyfuses to "remember" a reference "room temperature" and set it up to trip at "room temperature +100C" or maybe "room temperature +75C" for 150/125 degrees Celsius Tjmax self-limiting. E.g. crank the external set resistor from nominal until it trips the mechanism at room temp, then calculate the fuse code for it; or set it up as a shift register to first just feed dynamically to do binary search for what code makes it trip at room temp, and write that; or perhaps literally use a hot box kept at like 115C with a fan force-cooling the chip to near ambient, and do the binary search under those conditions. In any case, I'd assume there's easy-to-port temperature sensor IP you could readily harness and easily add some such factory calibration/zeroing block to. If it's some kind of digital temperature sensor mechanism, and the temperature sense core itself doesn't depend on a clock, it's probably quite easy to figure out how to plonk it down next to a simple DAC in front of a comparator so that this very DAC could be set to whatever code (+nominal offset that only assumes the scale isn't far off in temp co) trips it under factory conditions. This doesn't _have to be done by external hardware, it could be done on-die at first power-up from just feeding good power and then strapping into factory-cal mode, shouldn't even need a separate clock could just use a fairly trashy ring osc with heavy divider.
Avatar
Avatar
Tholin
So, if I try and run this simulation with the SPICE-extracted netlist of my power PFET array, it works for a while, until charging is completed. After a few us, current on V2 increases rapidly until it breaks the simulation ("timestep too small"), but the gate voltage remains at 5V and the capacitor doesn’t charge, so I don’t know where that energy is going. Is this a simulation oopsie or latchup?
It doesn’t do the current increase anymore, but still crashes. Considering the SPICE-extracted netlist has no parasitics and is just several thousand PFETs in parallel between the same two pins, I do believe this to be a simulation problem.
Avatar
Try Xyce if you don't do anything too fancy in ngspice
11:41 p.m.
(it's supposedly rather suited to large extracted circuits)
Avatar
Avatar
Tholin
It doesn’t do the current increase anymore, but still crashes. Considering the SPICE-extracted netlist has no parasitics and is just several thousand PFETs in parallel between the same two pins, I do believe this to be a simulation problem.
if they're literally identical you can optimize by replacing a bunch with just the m multiple parameter instead of physical duplicates. I'm surprised your extraction doesn't do that already for you.
11:43 p.m.
(I'm sorry it's been one and a half weeks since I had my desktop with working browser/internet, just phone in the meantime, I miss-estimates how much I'm "busy" catching up with various things..... won't get to too much spice reading today 🙁 )
Avatar
I wonder what the chances are of Xyce being able to simulate the whole chip for a few us...
Avatar
Avatar
Tholin
I wonder what the chances are of Xyce being able to simulate the whole chip for a few us...
do you have any oscillators on there?
1:35 a.m.
if not, then I'm highly confident it can, in part because it can readily adjust step size as appropriate. Thus it'd actually be pretty "free" to just go to several seconds worth of "steady state" solution from a transient start.
1:37 a.m.
well, not fully free, it'd still be like a hundred or a couple hundred time steps to go from transistor fT limited waveform fidelity needs up to multi-second scale, without just fast-forwarding over anything notable, but otherwise....
1:40 a.m.
Xyce is half made for that, and the other half to do non-public rad hard model sim for US nuclear and space stuffs. It's just that the base framework stuff is easy to keep separate from the modules that contain the spicy stuff that has export restrictions on it, and the us gov labs are generally quite happy to share code/software if it's science stuff that's like base frameworks/tooling.
1:45 a.m.
The System Advisor Model (SAM) is a performance and financial model designed to estimate the cost of energy for grid-connected power projects.
Hypersonic Task-based Research (HTR) solver for the Navier-Stokes equations at hypersonic Mach numbers including finite-rate chemistry for dissociating air and multicomponent transport. - stanfordh...
Avatar
SAM does history-mapped simulation of PV and PV+battery systems under most grid-tie models including financial aspects relevant in the US; also other energy sources but primarily solar and obviously focused (these days) on PV. HTR-solver does supersonic and hypersonic flow for you including notably (finite rate!) chemical reactions you're gonna catch when you superheat stuff like air. I think but am not sure it can actually do a rocket nozzle (liquid bipropellant, the injector, chamber, and then the nozzle itself) but never got around to reeeealy check/confirm. Certainly should be able to model the deflagration to detonation transition of a fuel/air gas mix in a hose/tube (the tamer ones are quite an eye catcher "fuse" for a potato cannon or the like if done with e.g. propane in clear pvc hose). And ofc actual normal aerodynamics that may or may not involve supersonic flow. It's written in Regent, based on Terra, based on (largely, though not exclusively LuaJIT 😄 (SAM is boring from the software implementation side afaik.)
Avatar
I’m still not sure why any of the opamps I’ve built so far are incapable of being used as voltage followers. Simulations when I wire them up as such always terminate with "timestep too small"
2:34 p.m.
Oh well
2:35 p.m.
Chaining two inverting amplifiers with a gain of 1 has served me well so far
Avatar
Avatar
Tholin
Current limiter with enable input build to drive a power FET array
My previous version of the PFET controller looked like this, but this is kinda problematic. The DISABLE input is digital. It fully turns off the PFETs if high, and is fed from a comparator that compares the battery voltage to the cutoff voltage. But this WILL end up oscillating as the battery nears fully charged, even with hysteresis added.
2:47 p.m.
So, new version, where DISABLE can actually be an analog signal
2:48 p.m.
Now if I replace the comparator in the control circuit with an opamp, I should have something closer to an actual voltage regulator.
2:48 p.m.
This new circuit essentially just produces an analog max between all its inputs
2:48 p.m.
With one input being the current reference
2:52 p.m.
Three inputs: current reference analog voltage limiter digital disable if the thing needs to be off entirely right now (i.e. charge complete, overtemperature)
Avatar
I hate diodes I hate diodes I hate diodes I hate diodes
Avatar
Why are you using them then ...
Avatar
What else am I supposed to do?
Avatar
The docs reference another two types of diodes in the PDK, but magic doesn’t have device generators for those, so I’d be on my own.
Avatar
Avatar
Tholin
So, new version, where DISABLE can actually be an analog signal
I can’t think of a way to re-design this circuit to not use diodes
Avatar
Anyways. Current approach works. There is still a little bit of oscillation, but its not as bad as it looks. I’d like to get rid of it, but.... yeah, simulation crashes make debugging this hard right now.
4:02 p.m.
Last thing to do is to detect when charging is actually done
4:03 p.m.
For which I might actually be able to use a shunt. I just need to detect that the current through the PFETs is nearing zero.
Avatar
Avatar
Tholin
I’m still not sure why any of the opamps I’ve built so far are incapable of being used as voltage followers. Simulations when I wire them up as such always terminate with "timestep too small"
....what inputs are you feeding them?
4:18 p.m.
if there are piece wise linear input sources in the netlist, I suggest to use Xyce it automatically inserts breakpoints for the integrator to split cleanly at these discontinuities.
4:20 p.m.
iirc my LiFePO4 charger LDO chips I've put onto the radio swarm boards use a cutoff of iirc 1% of what teh current limit is set to; and 10% when starting from deep discharge regions of voltage; might have mixed the two numbers up though I'd have to look at the datassheet to confirm.
4:21 p.m.
both should be ok though, especially the 10% cutoff for end of charge detection
Avatar
I’m not sure I can use Xyce from inside xschem
4:22 p.m.
it works like the same
4:22 p.m.
just the .control section is done differently
4:23 p.m.
it's a menu swap
4:23 p.m.
like, in the simulator setup menu you select xyce
4:25 p.m.
show me your .control section real quick and I'll tell you if I can just quickly try that for you after dinner
Avatar
good I can port that that's like just save all and rawfile and the tran itself
4:32 p.m.
baser is what?
Avatar
Its an old thing I no longer need. My control is actually this.
4:33 p.m.
I actually forgot what the method=gear is about. If I remove it, the simulation takes a lot longer to run and the current reference behaves completely differently.
Avatar
it's the integrator's predictor; iirc this is actually a sign your current reference is broken and an oscillator
6:03 p.m.
honestly
6:05 p.m.
try if it fixes if you just add a fat chunk of decoupling RC to it, just ideal. I'm going to have to apologize I won't get into the headspace for making this port proper before I catch some sleep, but I'll do it early tomorrow, well, around noon berlin time should be it.
Avatar
Avatar
Tholin
...oh!
....did I fix it?
Avatar
You were right that the current reference was oscillating
6:47 p.m.
I fixed it by making the output stage of the opamp larger
6:47 p.m.
It was having trouble driving its output
Avatar
Avatar
Tholin
So, new version, where DISABLE can actually be an analog signal
x1
Avatar
if there's a repo or something tomorrow I could update/swtich to Xyce I'd be up to try that fyi, like, after I'm done sleeping.
Avatar
I think I finally perfected this circuit. Here you see it start with constant current charging, then switch to constant voltage, then turn off once the charge current drops to near zero.
8:16 p.m.
The green line is the actual voltage of the capacitor being charged
8:17 p.m.
Yellow is what it sees on the BAT output of the chip
8:17 p.m.
It is oscillating, but this actually behaves better in every way than when I actively try to dampen the oscillations, which always just makes it oscillate MORE or crash the simulation.
8:18 p.m.
The resulting circuit is a mess, but its my mess and I love it
8:19 p.m.
The circuit to sense the charge current being low is... interesting, but it works
8:21 p.m.
There is an S/R latch that is reset whenever the voltage at BAT is roughly 10% below the charge cutoff reference and set when the charge current is detected to be low.
8:23 p.m.
I’m not sure how well the low current detection is going to work, so a digital input pin "LENb" can be used to disable the feature. In that case, the voltage regulator just keeps running and holds BAT at the cutoff voltage continuously.
8:24 p.m.
The "CE" input pin allow charging to be disabled whenever
8:25 p.m.
The three resistors and diode you see at the top right just serve to pull the power PFETs gates high if the battery is inserted but power to the charger is disconnected.
8:27 p.m.
I got a pull-up and pull-down generator because the digital IO pads require all the settings inputs to be set to something.
8:28 p.m.
I got an unused output
Avatar
And then this is the overdischarge protection circuit, also with a programmable cutoff. This one’s real simple.
8:53 p.m.
Avatar
Avatar
Tholin
I think I finally perfected this circuit. Here you see it start with constant current charging, then switch to constant voltage, then turn off once the charge current drops to near zero.
way too much oscillation tho
Avatar
Avatar
Tholin
It is oscillating, but this actually behaves better in every way than when I actively try to dampen the oscillations, which always just makes it oscillate MORE or crash the simulation.
have you ever found out how to chase I and V plots to hunt down where oscillation loops happen?
Avatar
Avatar
Tholin
The resulting circuit is a mess, but its my mess and I love it
I see purple and PU are the same net here; that's gonna extract horribly to spice, just to be aware
9:41 p.m.
though your hierarchical digital experiences should have taught you that already
Avatar
Avatar
namibj
way too much oscillation tho
Not much I can do about that. Would love to get rid of it, but the simulation crashes when I try.
10:35 p.m.
AIO charge controller and overdischarge protection IC for Li+, LiFePo, LTO and Na+ cells on wafer.space gf180mcu - AvalonSemiconductors/ws-charge-controller
❤️ 2
10:35 p.m.
All the action is happening in analog/ right now
Avatar
Tim 'mithro' Ansell 2026-09-07 9:11 a.m.
@namibj - The Julia people had some type of alternative engine for spice solving that they open sourced at some point.
Avatar
Avatar
Tim 'mithro' Ansell
@namibj - The Julia people had some type of alternative engine for spice solving that they open sourced at some point.
Yeah I've seen
Avatar
Any luck yet with getting my control circuit to simulate in Xyce?
9:48 p.m.
Its still crashes in ngspice, making it impossible for me to try and get rid of the oscillation.
Avatar
I'm sorry for the delays; I do have hope for tomorrow noon-ish based on the weather forecast saying it's gonna be decently comfy
12:52 a.m.
It should though I'm fairly confident it will.
Avatar
good news: I've got the container running and PDK set to gf180mcuD
Avatar
The container? You mean the nix shell?
Avatar
commit 3abac8518a4b802946efbb499cee2e6e946eb017 in my tt_gf-0p3_mcml repo (I'll fetch a link) , folder xschem, file c4_type_8_to_1_tb.sch, is set up to use Xyce to generat e arawfile.
1:00 p.m.
I'll take that as refereence right after I fetch a link to the commit (or if there's none yet, ensure it's on github and then get that link) and do a corresponding patch to your control_bench.sch, if that's ok, @Tholin ?
Avatar
Avatar
Tholin
The container? You mean the nix shell?
The Xyce probably isn't (properly) in that 🙁
1:01 p.m.
I have the IIC-OSIC container set up for the IHP Chipalooza related works of the high speed serdes
Avatar
It isn’t, but I got it installed on my machine through AUR
Avatar
that we'll port to sky130A and then backport to gf180mcuD
Avatar
Avatar
namibj
I'll take that as refereence right after I fetch a link to the commit (or if there's none yet, ensure it's on github and then get that link) and do a corresponding patch to your control_bench.sch, if that's ok, @Tholin ?
Yep, go ahead
Avatar
Avatar
Tholin
It isn’t, but I got it installed on my machine through AUR
yeah good I have it through arch mechanisms as well I can test with that in your shell once I have xschem doing things that work in the container at least
1:03 p.m.
like, as mentioned, I have it working right now on my project's testbench
1:03 p.m.
1:03 p.m.
note the ngspice parts being commented-out and the waveforms loaded
1:03 p.m.
I manually deleted the rawfile and reran sim to check btw
1:04 p.m.
(and between those two, manually cleared the waves in xschem)
1:11 p.m.
@Tholin Can you take that, cd into the xschem directory or just copy that folder over to your nix shell's influence, open the above mentioned testbench, and then in the xschem menu "simulation"->"configure simulators and tools"->{check "Xyce batch" in "spice", it should read Xyce "$N"} ?
Avatar
Not until I’m home
Avatar
put this in analog/xschem/simulation/, then cd there, then run Xyce control_bench.spice.
1:35 p.m.
@Tholin Something is whining about no model card for a pfet_06v0 device
Avatar
Avatar
Tholin
Not until I’m home
oh ok
Avatar
I made XM2 in approx also m=792 instead of it's m=726 as you had; I also set to divide the written w through m.
Avatar
m is supposed to be how many parallel transistors there are
1:51 p.m.
Do not divide w by m (edited)
Avatar
Wait wait ... m is the multiplier. n is the number of finger. If you have m=2 and W=10u then the effective width is 20u.
1:53 p.m.
If you have n=2 and W=10u then it's a single 2 finger transistor and the effective width is 10u because W is the W of all the fingers.
Avatar
@Tholin here ya go
2:42 p.m.
2:42 p.m.
2:43 p.m.
it did not like an nf=10 l=2u w=467.2u pfet_06v0.
2:44 p.m.
Also I was primarily requested to enable Xyce for it as Xyce has substantial amounts of tuning knobs and fancy fallbacks to use when convergence issues are encountered in more traditional Spice flows like you'd have with ngspice.
Avatar
Avatar
tnt
Wait wait ... m is the multiplier. n is the number of finger. If you have m=2 and W=10u then the effective width is 20u.
Yeah I know that's what I assumed the spec kinda asked for.... though given the power pass fet case of battery charger and it occupying a good chunk of a half slot I have a feeling it legit meant to be 800um by 500um
2:46 p.m.
(of a gigantic finger array)
2:47 p.m.
I'll have to jump and fetch my preordered bread before they close so be back in a bit, and only on phone in the meantime.
Avatar
Avatar
namibj
@Tholin here ya go
you should be able to just run git apply on the repo btw to apply the patch.
2:48 p.m.
well, git apply Xyce-patch-v1.patch. Make sure it's on the correct clean git commit!
2:49 p.m.
I admit I slightly changed the setting for the time thingy
2:50 p.m.
err, the pulse's length and period, that got the breakpoints and such more functional for xyce shomehow but that's not necessary other dials can do what this did to unlcok convergence, so that sim with the "correct/desired" time would work.
2:50 p.m.
i'll see sooon
Avatar
yeah looks very robust now
5:58 p.m.
adjusted some of them time integration and nonlinearsolver-tran options to be more robust
5:58 p.m.
at expense of happy-case speed
5:59 p.m.
let's see
5:59 p.m.
a full second with 1u max timestep enforcement, back to the enable pattern you had before
5:59 p.m.
(500 Hz, 50% duty cycle)
6:02 p.m.
I'll run it in the background and probably get back to trying to fix the oscillation behavior later after seeing about how to make it use the extracted power FET in place of this... well, not quite but rather first figuring out how to aggregate them into m as far as they happen to be identical fingers
6:04 p.m.
264 X1 BAT GATE DVDD DVDD pfet_06v0 ad=12.1472p pd=47.24u as=12.1472p ps=47.24u w=46.72u l=2u 66 X1 BAT GATE DVDD DVDD pfet_06v0 ad=12.1472p pd=47.24u as=20.5568p ps=94.32u w=46.72u l=2u 2376 X1 BAT GATE DVDD DVDD pfet_06v0 ad=12.1485p pd=47.245u as=12.1485p ps=47.245u w=46.725u l=2u 594 X1 BAT GATE DVDD DVDD pfet_06v0 ad=12.1485p pd=47.245u as=20.559p ps=94.32999u w=46.725u l=2u 264 X1 BAT GATE DVDD DVDD pfet_06v0 ad=16.3137p pd=63.265u as=16.3137p ps=63.265u w=62.745u l=2u 66 X1 BAT GATE DVDD DVDD pfet_06v0 ad=16.3137p pd=63.265u as=27.6078p ps=0.12637m w=62.745u l=2u 264 X1 BAT GATE DVDD DVDD pfet_06v0 ad=16.8948p pd=65.5u as=16.8948p ps=65.5u w=64.98u l=2u 66 X1 BAT GATE DVDD DVDD pfet_06v0 ad=16.8948p pd=65.5u as=28.5912p ps=0.13084m w=64.98u l=2u 264 X1 BAT GATE DVDD DVDD pfet_06v0 ad=19.8679p pd=76.935u as=19.8679p ps=76.935u w=76.41499u l=2u 66 X1 BAT GATE DVDD DVDD pfet_06v0 ad=19.8679p pd=76.935u as=33.6226p ps=0.15371m w=76.41499u l=2u 264 X1 BAT GATE DVDD DVDD pfet_06v0 ad=19.8796p pd=76.98u as=19.8796p ps=76.98u w=76.46u l=2u 66 X1 BAT GATE DVDD DVDD pfet_06v0 ad=19.8796p pd=76.98u as=33.6424p ps=0.1538m w=76.46u l=2u 1848 X1 BAT GATE DVDD DVDD pfet_06v0 ad=19.8809p pd=76.985u as=19.8809p ps=76.985u w=76.465u l=2u 462 X1 BAT GATE DVDD DVDD pfet_06v0 ad=19.8809p pd=76.985u as=33.6446p ps=0.15381m w=76.465u l=2u 264 X1 BAT GATE DVDD DVDD pfet_06v0 ad=19.8822p pd=76.99u as=19.8822p ps=76.99u w=76.47u l=2u 66 X1 BAT GATE DVDD DVDD pfet_06v0 ad=19.8822p pd=76.99u as=33.6468p ps=0.15382m w=76.47u l=2u 264 X1 BAT GATE DVDD DVDD pfet_06v0 ad=19.8952p pd=77.04u as=19.8952p ps=77.04u w=76.52u l=2u 66 X1 BAT GATE DVDD DVDD pfet_06v0 ad=19.8952p pd=77.04u as=33.6688p ps=0.15392m w=76.52u l=2u 264 X1 DVDD GATE BAT DVDD pfet_06v0 ad=12.1472p pd=47.24u as=12.1472p ps=47.24u w=46.72u l=2u 2376 X1 DVDD GATE BAT DVDD pfet_06v0 ad=12.1485p pd=47.245u as=12.1485p ps=47.245u w=46.725u l=2u 264 X1 DVDD GATE BAT DVDD pfet_06v0 ad=16.3137p pd=63.265u as=16.3137p ps=63.265u w=62.745u l=2u 264 X1 DVDD GATE BAT DVDD pfet_06v0 ad=16.8948p pd=65.5u as=16.8948p ps=65.5u w=64.98u l=2u 264 X1 DVDD GATE BAT DVDD pfet_06v0 ad=19.8679p pd=76.935u as=19.8679p ps=76.935u w=76.41499u l=2u 264 X1 DVDD GATE BAT DVDD pfet_06v0 ad=19.8796p pd=76.98u as=19.8796p ps=76.98u w=76.46u l=2u 1848 X1 DVDD GATE BAT DVDD pfet_06v0 ad=19.8809p pd=76.985u as=19.8809p ps=76.985u w=76.465u l=2u 264 X1 DVDD GATE BAT DVDD pfet_06v0 ad=19.8822p pd=76.99u as=19.8822p ps=76.99u w=76.47u l=2u 264 X1 DVDD GATE BAT DVDD pfet_06v0 ad=19.8952p pd=77.04u as=19.8952p ps=77.04u w=76.52u l=2u 66 X1 DVDD GATE BAT DVDD pfet_06v0 ad=20.5568p pd=94.32u as=12.1472p ps=47.24u w=46.72u l=2u 594 X1 DVDD GATE BAT DVDD pfet_06v0 ad=20.559p pd=94.32999u as=12.1485p ps=47.245u w=46.725u l=2u 66 X1 DVDD GATE BAT DVDD pfet_06v0 ad=27.6078p pd=0.12637m as=16.3137p ps=63.265u w=62.745u l=2u 66 X1 DVDD GATE BAT DVDD pfet_06v0 ad=28.5912p pd=0.13084m as=16.8948p ps=65.5u w=64.98u l=2u 66 X1 DVDD GATE BAT DVDD pfet_06v0 ad=33.6226p pd=0.15371m as=19.8679p ps=76.935u w=76.41499u l=2u 66 X1 DVDD GATE BAT DVDD pfet_06v0 ad=33.6424p pd=0.1538m as=19.8796p ps=76.98u w=76.46u l=2u 462 X1 DVDD GATE BAT DVDD pfet_06v0 ad=33.6446p pd=0.15381m as=19.8809p ps=76.985u w=76.465u l=2u 66 X1 DVDD GATE BAT DVDD pfet_06v0 ad=33.6468p pd=0.15382m as=19.8822p ps=76.99u w=76.47u l=2u 66 X1 DVDD GATE BAT DVDD pfet_06v0 ad=33.6688p pd=0.15392m as=19.8952p ps=77.04u w=76.52u l=2u
6:05 p.m.
number of instances of that exact finger is up front, haven't yet scripted that into m as I might wanna also deduplicate across the BAT GATE DVDD vs. DVDD GATE BAT.
6:06 p.m.
which isn't the most trivial due to ad/pd and as/ps being specific to drain and source respectively. Still not hard to bulk edit though.
6:07 p.m.
rg -e '^X[0-9]+ ' -r 'X1 ' extracted/power_fet_f.spice | sort | uniq -c
Avatar
I don’t think it likes me
Avatar
Avatar
namibj
Click to see attachment 🖼️
I get an identical view as this screenshot
6:59 p.m.
Oh, the power_fet_approx was not updated correctly, it seems?
6:59 p.m.
I applied the changes manually
6:59 p.m.
I think its doing something
6:59 p.m.
I’m pinned at 100% CPU usage
7:00 p.m.
But those changes also break the simulation
7:00 p.m.
I’m not sure why you changed m on one of them either
7:01 p.m.
Those values were based off of what I have in the magic layout
7:01 p.m.
As you saw, the magic SPICE extraction has thousands of individual pfet devices. I just compressed that into two symbols with a high m
7:01 p.m.
Because of how I broke the transistors up horizontally, those values were all correct
7:07 p.m.
I can pretend to Xyce that the FETs are smaller by dividing their widths by 10 and multiplying m by 10
7:07 p.m.
Its effectively the same thing
7:08 p.m.
What is happening there at the end?
7:09 p.m.
Nothing should be happening anymore after charging completes
7:09 p.m.
CHRGb is a digital output too
7:09 p.m.
Btw, that point is where ngspice used to crash
Avatar
Okay, what happens is that the capacitor starts discharging again, causing x1.x3 to turn off. Now, this is expected and should have no side effects since the charge disable is latched.
7:20 p.m.
Yeah, nothing should happen as a result of this. No idea why CHRGb dips.
7:22 p.m.
If the diodes are leaky, this might be happening, actually
Avatar
yeah trying this with 100m time now instead.... should I perhaps change the CE pulse source to have substantially less transients going on and thus allow larger time steps for covering long time spans with no high frequency activity?
Avatar
CE should go high after a short delay and stay there for the entire simulation, unless you’re specifically testing it
7:24 p.m.
How are you getting a progress display? I just get xschem freezing until its done.
Avatar
Avatar
Tholin
Its effectively the same thing
IMO better do the extraction style with aggregation of identical fingers into m; much clearer overall and actually should be representative of physical reality because it does cover true length (there are endcap effects going on, that's why it even matters what length they are set to for the sim). Maybe something something LVS-adjacent can get you such convenient aggregation even across the source/drain ambiguity?
Avatar
Avatar
Tholin
CE should go high after a short delay and stay there for the entire simulation, unless you’re specifically testing it
ahhhh ok I'll do that
7:27 p.m.
stopped; now gonna change the PULSE to stay on
Avatar
Okay, diodes are definitely leaking current in the reverse
7:27 p.m.
Not sure how much or how to reduce it
7:28 p.m.
Going to put resistors in series with the diodes
7:31 p.m.
Redesigned the circuit a lil to have resistors in series with the diodes.
Avatar
trying 5.1ms long only now it started to get bogged down in time step size briefly after 5.01 ish
Avatar
Avatar
Tholin
Not sure how much or how to reduce it
don't have them
Avatar
Avatar
Tholin
Going to put resistors in series with the diodes
......ehhhh, what diodes, where do they come from/why are they even existing at all?
Avatar
Avatar
Tholin
How are you getting a progress display? I just get xschem freezing until its done.
call Xyce in terminal
7:43 p.m.
also what kind of machine setup do you have? I'll whip you up a reasonable match to my mpirun config to let it run on more than one core
7:44 p.m.
(nice nice mpirun -np 2 --map-by package:hwtcpus:pe=15 Xyce -a control_bench.spice < /dev/null | tee ../Xyce_log_`date -Is | tr : _`.cat) & this is what I run
Avatar
Avatar
namibj
......ehhhh, what diodes, where do they come from/why are they even existing at all?
In current_ref
7:48 p.m.
accidentally didn't have time correctly set tho 🙁
7:48 p.m.
here ya go tho
Avatar
Avatar
Tholin
In current_ref
why are they so large? have you tried using shotkey ones instead perhaps?
Avatar
There is no device generator for shotkey diodes in magic
8:05 p.m.
So I’d be on my own
Avatar
Avatar
Tholin
In current_ref
Also, consider using current-sourcing-only (only pfet outputs, skipping the nfet's) for the drives of current_ref's CURREF/CTRL/DISABLE. If you don't pull them low they don't leak (nearly as) much.
8:10 p.m.
well, not sure about CURREF but the others probably don't need to be capable of sinking current given one of them is a comparator and the other literally just a CMOS buffer
Avatar
Avatar
Tholin
There is no device generator for shotkey diodes in magic
There is in Klayout
8:15 p.m.
but until junctions stop being acceptable, just use those
Avatar
Avatar
namibj
well, not sure about CURREF but the others probably don't need to be capable of sinking current given one of them is a comparator and the other literally just a CMOS buffer
`
8:16 p.m.
CTRL is also intended to be analog
8:16 p.m.
Its just being driven by a comparator because that is generating less oscillations for some reason
Avatar
I'd go for diffusion-to-well diodes (nwell or lvpwell-in-dnwell, whichever is the one that gives the diodes the correct oreintation/polarity) with tiny fingers that are depending on reliability and how much current actually needs to be coped with either one or a small handful (up to like 6 or so I'd go without going for mathing the currents against the limits in the PDK docs for contacts, by feeling, trying to be fewer if vibes allow) of contacts to a single diffusion "finger" and multiple such fingers in the same well; with well taps on the outside and between these min-size diffusion fingers.
Avatar
They are p diffusion to nwell diodes
8:22 p.m.
I cannot generate the deep n-well ones because no magic device generators
Avatar
yeah just that 😄
8:23 p.m.
the anode is which one again? p or n?
8:25 p.m.
right p is anode
8:25 p.m.
good
8:25 p.m.
literally then just p diffusion to nwell
8:25 p.m.
but like, make them share a single nwell
8:26 p.m.
well, if it matters that is, shouldn't change the leakage out of the anode but will affect the leakage from the cathode to the substrate
8:32 p.m.
ok I want you to try and reduce the power output control bandwidth substantially by increasing the output impedance from the gate drive towards the large capacitance of the many gate fingers by a factor of 10 and if that still shows substantial oscillation another 10. I guess put a long enough poly resistor there
8:33 p.m.
I think the internals should be sufficciently more bandwidth than the power output in order to let the internals settle nicely prior to the output getting a chance to oscillate.
Avatar
The klayout sc diode has 686 DRC violations in magic
8:37 p.m.
I think I just need to figure out how to draw one by hand
Avatar
There is a chance that step-recovery and/or the directly related reverse recovery charge of those diodes are largely to blame for some interacting oscillation behavior between the 3 anodes; shottkey diode would not exhibit this; drawing it in magic will be the lesser issue the....
8:41 p.m.
This is a 3-finger min-size-the-device-generator-in-klayout-accepts schottky; the upper m1 bar joins the anodes and from all I can tell the cathodes are just well taps for the dnwell
8:47 p.m.
Avatar
I think I've hit oscillation behavior; capped it at what's only a couple minutes of simulation time, and re-running now to get a valid formatted rawfile out for xschem to look at
Avatar
Magic is NOT enjoying this
9:41 p.m.
Weird DRC errors
Avatar
What? What is this?
9:55 p.m.
This seems broken
9:57 p.m.
Yeah, magic... did not parse that one correctly, I think
Avatar
After all this, it turns out that schottkys are not available as medium voltage devices
10:07 p.m.
3.3V only
10:09 p.m.
I think, ideally, I need a way for this to not use diodes
10:09 p.m.
DISABLE is a digital input. I can find another way to implement it.
10:09 p.m.
But CTRL has to be analog
10:09 p.m.
Essentially, the circuit is supposed to do a max(CURREF, CTRL)
10:09 p.m.
CURREF limits current, CTRL limits voltage
10:11 p.m.
On an empty cell, CURREF is going to be the thing limiting the PFETs as the cell is sinking so much power, the voltage regulator would have to turn the PFETs up way too much to raise the voltage. But eventually, the cell fills up, and the current is enough to raise the voltage, and now the voltage regulator has to kick in.
10:12 p.m.
Wait a second
10:13 p.m.
Instead of having a single block of power PFETs like this
10:13 p.m.
What if I just put two power PFETs in series?
10:13 p.m.
One under control of the current limiter and the other under control of the voltage regulator?
10:14 p.m.
Both can limit the flow of electricity. The current that ends up making it all the way through is determined by the lesser of the two.
10:15 p.m.
That would require me to edit my power PFET layout to be set up this way, and each stage would half in size
10:15 p.m.
But I think it’d still be capable of putting through 1A
10:16 p.m.
@namibj Would this work? The only thing I can imagine messing this up is oscillations right at the boundary where the current limiter and voltage regulator fight with each other.
Avatar
Avatar
Tholin
What if I just put two power PFETs in series?
don't
Avatar
Avatar
Tholin
After all this, it turns out that schottkys are not available as medium voltage devices
Schottky_diode layer can exist both in LV or MV area.
https://gf180mcu-pdk.readthedocs.io/en/latest/physical_verification/design_manual/drm_10_14.html
Model vs EP Nominal Target sc_diode (W/L/m) =(0.62u/20u/4) Model BV (V) I_leak (nA/um^2) Von (V) BV I_leak (V) (nA/um^2) Von (V) Min -10 - 0.22 - - - Typ -17 35 0.32 -17.6 31 0.32 Max - 200 0.42 - - -
Avatar
Avatar
Tholin
Essentially, the circuit is supposed to do a max(CURREF, CTRL)
ok fine
10:20 p.m.
ideally do some sort of softmax action; not sure how that's best implemented in asic here tho
Avatar
Avatar
namibj
don't
?
Avatar
Avatar
namibj
Schottky_diode layer can exist both in LV or MV area.
https://gf180mcu-pdk.readthedocs.io/en/latest/physical_verification/design_manual/drm_10_14.html
Model vs EP Nominal Target sc_diode (W/L/m) =(0.62u/20u/4) Model BV (V) I_leak (nA/um^2) Von (V) BV I_leak (V) (nA/um^2) Von (V) Min -10 - 0.22 - - - Typ -17 35 0.32 -17.6 31 0.32 Max - 200 0.42 - - -
Ok, then, magic is refusing to extract them
Avatar
like should just ideally smoothly blend at the transition instead of overshooting either controller's op-amps to beyond their linear range
Avatar
Avatar
Tholin
Ok, then, magic is refusing to extract them
@Tim Edwards
10:22 p.m.
Pretty sure the shottky_diode behavior doesn't care about thin vs. thick oxide zone though
10:22 p.m.
doesn't involve poly after all
Avatar
Avatar
Tholin
I think, ideally, I need a way for this to not use diodes
maybe put large enough capacitors on the anode side of those diodes so they don't get as much opportunity to start ringing between which one of them is winning the control at the moment where the blending action is going on
10:26 p.m.
XR8, XR6, XC1, FILT, TRIG.... what's that for?
10:27 p.m.
end-of-charge?
Avatar
Avatar
namibj
@Tim Edwards
Avatar
Avatar
namibj
end-of-charge?
Yes
10:30 p.m.
It has a low-pass filter on it so transients from the oscillations don’t trigger it
Avatar
Avatar
Tholin
Click to see attachment 🖼️
huh
Avatar
Avatar
namibj
maybe put large enough capacitors on the anode side of those diodes so they don't get as much opportunity to start ringing between which one of them is winning the control at the moment where the blending action is going on
I mean, the diodes are a hassle in general. They break ngspice, they have some strange reverse leakage and they have a voltage drop because they’re diodes, making it even harder for both the voltage reg or the current limiter to do their jobs.
Avatar
can you show me lol.gds?
10:33 p.m.
Its a mag file
10:34 p.m.
I’m pretty sure I messed it up, though, because it claims A and K are electrically shorted
Avatar
yeah please mint a gds for me if you can
10:34 p.m.
oh it opened it looks non-terrible at least
10:35 p.m.
ok the shottkey zone should be larger
10:36 p.m.
it should be contained in the dnwell but the shottkey zone should fully cover all the diffusions and contacts other than the guardring
10:38 p.m.
One thing I don’t understand is how this doesn’t short both anode and cathode to ground? Because, the deep n-well is contacting the n-well, so its also grounded.
10:38 p.m.
I’m not sure what’s going on here
Avatar
also the diffusions for anode that are not the outer ones because those can't be anode are comp but NOT nplus
10:39 p.m.
there is no pplus other than the guard ring at all
10:39 p.m.
yeah it's a contact on comp without plus diffusion, and that's why it's a shottkey junction that's formed
Avatar
Oh, I see
10:40 p.m.
I think I know what I need to do to fix this
Avatar
Avatar
Tholin
Click to see attachment 🖼️
this looks good
Avatar
Yeah, but the way magic parses it is messed up
10:41 p.m.
Avatar
Avatar
Tholin
One thing I don’t understand is how this doesn’t short both anode and cathode to ground? Because, the deep n-well is contacting the n-well, so its also grounded.
there's no nwell, only the dnwell. substrate is psub.
Avatar
Avatar
Tholin
Click to see attachment 🖼️
yikes, welp
Avatar
Oh my god. I... swapped nwell and pwell/substrate in my head again, as usual.
Avatar
I mean drawing a finger that's legal shouldn't be too hard
Avatar
Yeah, I understand now
Avatar
the anode in the middle of the two cathodes need to not extend beyond the cathode
Avatar
Avatar
namibj
yikes, welp
I’m not sure how its SUPPOSED to be, is the problem
Avatar
gaps can be larger than what the klayout example has
Avatar
Avatar
Tholin
I’m not sure how its SUPPOSED to be, is the problem
can't you draw comp without pplus nplus or gate?
10:45 p.m.
According to opening the .mag file in a text editor, this in the box here is "schottkyc". A special contact layer. Maybe that’s it?
10:47 p.m.
Nope
Avatar
ok I can't find any structure that has that... huh, weird indeed.
10:48 p.m.
yeah let's wait with the drawing of it in magic for tim to respond
Avatar
I would still like to see if I can re-design this circuit to not require diodes
10:54 p.m.
10:55 p.m.
is that from the discharge resistor on the battery simulating capacitor vs. the lack of sufficcient input hysteresis action on the voltage limit / end-of-charge comparators?
Avatar
I think that should be the discharge resistor
Avatar
Avatar
Tholin
I would still like to see if I can re-design this circuit to not require diodes
I mean you can have, ignoring the comparatively trivial matter of dealing with the digital disable function, it such that the current limit providing op-amp does the needed pull-down action to turn the gate as much on as that aspect would like, and then you take a series transistor to limit this drive strength if the voltage limit is reached
10:59 p.m.
all against a static pull-up or something that looks like a depletion-load.... like, I mean, it can be a resistor or a constant current pull-up
11:04 p.m.
Great network fail again 🙁
11:06 p.m.
Welp, mpv still works even if my desk keyboard choked and I can't easily fix that now....
Avatar
This almost works
11:25 p.m.
Its just an analog adder
11:26 p.m.
The hope is that the voltage reg can add additional voltage to the control signal to restrict it further
11:26 p.m.
But in order to do that, I have to replace a comparator in control with an opamp
11:26 p.m.
And these are not rail-to-rail
11:26 p.m.
So the less than 1V it outputs breaks the adder.
11:27 p.m.
I just can not escape the diodes
Avatar
Wait, I just did it
11:45 p.m.
This is working with way more minimal oscillations (the compout oscillations were rail-to-rail before)
11:45 p.m.
I... how?
11:46 p.m.
My code schematic works, and I don’t know why
11:46 p.m.
Pushed to my repo
11:47 p.m.
I’m going to bed, my brain can’t handle more weirdness today
11:52 p.m.
Charge complete detection is broken, I’ll get to it later.
Avatar
for the disable action you can then further (if the current limit machinery may stay on during the disable event) put a digital pass gate/transmission gate between the output of this and the gate power driver, and hard-clamp-pull-up the gate to turn it as off as can be.
1:00 a.m.
Look at the gate capacitance of the power FET and see what RC time constant you're getting there with the drive strength to it. Might have to look at what voltage gain you're expecting out of it too as that'll bump the gain bandwidth product up by that gain
1:00 a.m.
or down if you have sub-unity voltage gain as I'd expect it to do under LDO operating conditions!!!
Avatar
Avatar
Tholin
So the less than 1V it outputs breaks the adder.
you should be able to set up for the adder to operate in only the say center third of the rail-to-rail range and just simple voltage divider inputs and output-feedback to that very range
1:03 a.m.
you don't need rail to rail output at any place, you only need the final drive to have enough range to cover the desired operating conditions of your power FET; use appropriate resistor-divider-scaled feedback to map it to the control signals inside.
Avatar
Avatar
Tholin
This is working with way more minimal oscillations (the compout oscillations were rail-to-rail before)
silicon p[i]n diodes have a lil weird behavior due to their reverse recovery charge; though not too unliklely the mere rectifying could have already done it.
1:07 a.m.
remember the feedback to the COMPOUT is blocked off as far as DC flow goes when the diode is biased blocking.... and AC impedance is gonna be much different between forward biased and reverse biased conditions.
Avatar
Avatar
Tholin
Pushed to my repo
oh great I'll try to check it out and look at where specifically the oscillation originates from there.
Avatar
Pushed again. Charge complete detection now works again. (edited)
Exported 363 message(s)
Timezone: UTC+0